import request from '@/utils/request'

// 查询兑换记录列表
export function listRecords(query) {
  return request({
    url: '/records/records/list',
    method: 'get',
    params: query
  })
}

// 查询兑换记录详细
export function getRecords(exchangeRecordsId) {
  return request({
    url: '/records/records/' + exchangeRecordsId,
    method: 'get'
  })
}

// 新增兑换记录
export function addRecords(data) {
  return request({
    url: '/records/records',
    method: 'post',
    data: data
  })
}

// 修改兑换记录
export function updateRecords(data) {
  return request({
    url: '/records/records',
    method: 'put',
    data: data
  })
}

// 删除兑换记录
export function delRecords(exchangeRecordsId) {
  return request({
    url: '/records/records/' + exchangeRecordsId,
    method: 'delete'
  })
}

// 查询我的兑换记录列表
export function myListRecords(query) {
  return request({
    url: '/records/records/myListRecords',
    method: 'get',
    params: query
  })
}
